<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/24 0024
 * Time: 20:53
 */
$context = stream_context_create(
    ['ftp' => ['overwrite' => true]]
);
$fp = fopen('ftp://secret@ftp.php.net', 'wb',false,$context);